<%@ Language=VBScript %>
<%Option Explicit%>

<!--#include file="../cons.asp"-->
<!--#include file="../../Common/Database.asp"-->

<%
	response.CacheControl = "no-cache"
	Dim oConn, sSQL, oRS
	Dim IdCurso, cursoDescrip, iPlanilla, sTriBi
	
	IdCurso = request("IdCurso")
	cursoDescrip = request("cursoDescrip")
    
    if IdCurso = "35" or IdCurso = "36" or IdCurso = "37" or IdCurso="38" or IdCurso="39" or IdCurso="40" then
        iPlanilla = 4
        sTriBi = "Trimestre"
    end if
    if IdCurso = "31" or IdCurso = "33" or IdCurso = "34" then
        iPlanilla = 3
        sTriBi = "Bimestre"
    end if
    if IdCurso = "45" then
        iPlanilla = 2
        sTriBi = "Bimestre"
    end if
    if IdCurso = "41" or IdCurso = "42" or IdCurso = "43" or IdCurso = "44" then
        iPlanilla = 1
        sTriBi = "Bimestre"
    end if

	Set oConn = OpenConnection
	
	sSQL=	"select * from Periodos where IdTipoPlanilla = " & iPlanilla
	'response.Write sSQL
	'response.End
	Set oRS = oConn.Execute(sSQL)

	response.Write "<select id=""cmb_Quincenas"" style=""font-family: Verdana; font-size: 10px;"" onchange=""GetAlumnosxFirmas(cmb_Cursos.value, cmb_FnoF.value, this.value);"">"
	Dim iprimero
	while not oRS.EOF
		response.Write "<option value='" & oRS("IdPeriodo") & "'"
		'if oRS("IdMateria") = IdMateria then
		'	response.Write " selected"
		'end if
		response.Write ">"
		response.Write server.HTMLEncode(sTriBi & " " & oRS("NroPeriodo") & " (" & oRS("FechaDesde") & " - " & oRS("FechaHasta") & ")")
		response.Write "</option>"
		oRS.MoveNext()
	wend
	response.Write "</select>"
%>